define('homeController', ['angular', 'jquery'], function (angular, $) {
    var module = angular.module('controllers');
    module.controller('homeController', ['$scope', 'goods', 'cart', function ($scope, g, cart) {
        $scope.cartServer = cart;
        $scope.addCart=function(g){
            cart.add(g);
        }
        $scope.data = g.all();
        $scope.cart = {};
        $scope.cart.total = cart.getTotalPrice();
    }]);
});